Skip to content

NEW @W-17977608@ CSV output format for rules - #326

Merged
jfeingold35 merged 7 commits into
devfrom
d/W-17977608
Aug 14, 2025
Merged

NEW @W-17977608@ CSV output format for rules#326
jfeingold35 merged 7 commits into
devfrom
d/W-17977608

Conversation

@jfeingold35

Copy link
Copy Markdown
Contributor

No description provided.

@stephen-carter-at-sf stephen-carter-at-sf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you are missing the command help text updates.

Also why is graph engine creating files still locally? Let’s not check these in - we should make it so these don’t get created locally

}
}

export class NewlineDescriptionEnginePlugin extends engApi.EnginePluginV1 {

@stephen-carter-at-sf stephen-carter-at-sf Aug 14, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of creating yet another plugin and engine, consider just modifying the description for stub1RuleA or something with a newline and I would also suggest we add in various quotes as well.

Notice how we did this with the violation on line 365 above.

This should prevent us from having to have another file inside of exectedOutputFiles ... i.e. can we remove ruleSelectionWithNewlines.goldfile.csv in favor of just updating multipleRules.goldfile.csv

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, modifying the rule description is probably a good idea. I'll look into that.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. is this used anymore? If not, then can we remove it and its corresponding engine?

@jfeingold35

Copy link
Copy Markdown
Contributor Author

I think you are missing the command help text updates.

Also why is graph engine creating files still locally? Let’s not check these in - we should make it so these don’t get created locally

The command help text is on the CLI side, right?
Also, yeah, good catch on the SFGE files. Not sure how those ended up there. I think my local config might have done something. I'll remove them.

Comment on lines +210 to +226
const complicatedRuleSelection: RuleSelectionImpl = new RuleSelectionImpl();
const rule1: RuleImpl = new RuleImpl('stubEngine1', {
name: 'stub1RuleA',
severityLevel: SeverityLevel.Moderate,
tags: ['Recommended', 'CodeStyle'],
description: 'A rule description that contains\na new line character, as well as `ticks`, "double quotes", \'single quotes\,\n<brackets>, and even {curly braces}!',
resourceUrls: ['https://example.com/stub1RuleA', 'https://example.com/stub1RuleA_2']
});
const rule2: RuleImpl = new RuleImpl('stubEngine1', {
name: 'stub1RuleB',
severityLevel: SeverityLevel.Low,
tags: ['Recommended', 'Performance'],
description: 'A simple description this time',
resourceUrls: []
});
complicatedRuleSelection.addRule(rule1);
complicatedRuleSelection.addRule(rule2);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than modify the actual hardcoded description of any of the stub rules (which would have likely impacted other tests), I decided it was just easier to instantiate a rule selection from scratch with some made up rules.
It's my opinion that this is acceptable, but I'm prepared for disagreement.

@jfeingold35
jfeingold35 merged commit d4f6406 into dev Aug 14, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants